import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import polly.Dog;

public class Bean {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("Bean.xml");
        //第一种方式，普通的类型的bean查找
//        Dog dog1 = context.getBean(Dog.class);
//        dog1.sayName();

        Dog dog2 = context.getBean("static-method",Dog.class);
        dog2.sayName();
    }
}
